package com.vipshop.compass.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.annotations.Index;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;

@Entity
@Table(name = "demo_table", catalog = "vips_compass")
@Indexed
@XmlRootElement
public class Demo {

	private int dualPid;

	private String name;

	private Date createdTimestamp;

	@Id
	@Column(name = "dual_pid")
	@GeneratedValue
	public int getDualPid() {
		return dualPid;
	}

	public void setDualPid(int dualPid) {
		this.dualPid = dualPid;
	}

	@Column(name = "DUAL_NAME", length = 20)
	@Field
	@Index(name="dual_name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "CREATED_TIMESTAMP")
	public Date getCreatedTimestamp() {
		return createdTimestamp;
	}

	public void setCreatedTimestamp(Date createdTimestamp) {
		this.createdTimestamp = createdTimestamp;
	}

}
